<!DOCTYPE HTML>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <meta name="csrf-token" content="{{ csrf_token() }}">
    <title></title>
    <link rel="stylesheet" href="/css_system/common.css"/>
    <link rel="stylesheet" href="/css_system/main.css"/>
    <link href="/js_system/jQueryUI/jquery-ui.css" rel="stylesheet">
    <!-- 对话框 -->
    <link rel="stylesheet" href="/js_system/easydialog/easydialog.css"/>
    <script type="text/javascript" src="/js_system/easydialog/easydialog.js"></script>
    <script type="text/javascript" src="/js_system/cueeasy.js"></script>
    <script type="text/javascript" src="/js_system/jquery.min.js"></script>
    <!-- 上传图片 -->
    <script type="text/javascript" src="/uploadify/jquery.uploadify.js"></script>
    <link rel="stylesheet" type="text/css" href="/uploadify/uploadify.css">
    <script type="text/javascript" src="/js_system/poster.js"></script>
</head>
<body>
<div class="container">
    <div class="location clearfix">
        <div class="here_area fl"><strong>当前位置：</strong>海报模板管理&nbsp;&nbsp;&raquo;&nbsp;&nbsp;修改模板</div>
        <div class="here_btn fr">
            <a href="javascript:history.back()" class="btn btn_back">返回</a>
            <a href="javascript:;" onclick="location.replace(location.href);" class="btn btn_refresh">刷新</a>
        </div>
    </div>
    <div id="tabs">
        <ul>
            <li><a href="#tabs-1">基本信息</a></li>
        </ul>
        @include('common.errors')
        <form action="/admin_system/poster/indexedit/{{$entPosterTemplate->PoTeID}}" method="post">
            <div id="tabs-1">
                @include('common.alert-url')
                <table class="dataTable">
                    <input type="hidden" name="_token" value="<?php echo csrf_token(); ?>">
                    <tbody>

                    <tr>
                        <td class="ltd">模板名称</td>
                        <td class="rtd">
                            <input id="txtPosterTitle"  value="{{$entPosterTemplate->PosterTitle}}" class="input-text" type="text"
                                   name="txtPosterTitle"/>
                        </td>
                    </tr>
                    <tr>
                        <td class="ltd">列表图片(690px*810px)<br/>请上传PNG格式的图片</td>
                        <td class="rtd">
                            <div class="PreviewImg">
                                <div id="PreviewImgs"
                                     style="padding:0px; background:#fff url(/images_system/yulan.gif) no-repeat center;"
                                     class="PreviewTD delfile_1">
                                    @if($entPosterTemplate->FilePath1!='')<a target="_blank" href="{{$entPosterTemplate->FilePath1}}"><img src="{{$entPosterTemplate->FilePath1}}"></a>@endif
                                </div>
                            </div>
                            <input type="hidden" id="File_1" value="{{$entPosterTemplate->FilePath1}}" name="File_1">
                            <input id="file_upload" name="file_upload" type="file">
                            @if($entPosterTemplate->FilePath1=='')
                                <a id="addvideoFile_1" style="font-weight:normal;color:#FFF; " class="button button-primary"
                                   href="javascript:$('#file_upload').uploadify('upload','*');">上传</a>
                                <a id="delvideoFile_1" style="font-weight:normal;color:#FFF; display: none;" onclick="delFile(1);" class="button button-primary"
                                   href="javascript:void(0);">删除</a>
                            @else
                                <a id="addvideoFile_1" style="font-weight:normal;color:#FFF; display: none;" class="button button-primary"
                                   href="javascript:$('#file_upload').uploadify('upload','*');">上传</a>
                                <a id="delvideoFile_1" style="font-weight:normal;color:#FFF; " onclick="delFile(1);" class="button button-primary"
                                   href="javascript:void(0);">删除</a>
                            @endif


                            <script type="text/javascript">
                                <?php $timestamp = time();?>
                                $(function () {
                                    $('#file_upload').uploadify({
                                        'buttonText': "请选择文件",
                                        'fileTypeExts': '*.jpg;*.gif;*.png;*.jpeg',
                                        'auto': false,
                                        'formData': {
                                            'timestamp': '<?php echo $timestamp;?>',
                                            'token': '<?php echo md5('unique_salt' . $timestamp);?>'
                                        },
                                        'swf': '/uploadify/uploadify.swf',
                                        'uploader': '/uploadify/uploadify.php',
                                        'onUploadSuccess': function (file, data, response) {
                                            if (data != '') {
                                                $('#File_1').val(data);
                                                $('#addvideoFile_1').hide();
                                                $('#delvideoFile_1').show();
                                                $('#PreviewImgs').html('<a target="_blank" href=' + data + '><img src=' + data + '></a>');
                                            }
                                        }
                                    });
                                });
                            </script>

                        </td>
                    </tr>
                    <tr>
                        <td class="ltd">显示 / 隐藏</td>
                        <td class="rtd">
                                    <span class="Radio">
	                                   <?php $IsShow=$entPosterTemplate->IsShow;?>
                                        <input id="RadIsShow1"  type="radio" value="1" <?php if($IsShow==1){ echo 'checked="checked"';}  ?>  name="RadIsShow" /><label for="RadIsShow1">显示</label>
	                                    <input id="RadIsShow0" type="radio" value="0" <?php if($IsShow==0){ echo 'checked="checked"';} ?>  name="RadIsShow" /><label for="RadIsShow0">隐藏</label>
	                                 </span>
                        </td>
                    </tr>
                    </tbody>

                </table>
            </div>

            <div class="contBtn">
                <table class="dataTable">
                    <tfoot>
                    <tr>
                        <td class="ltd"></td>
                        <td class="rtd">
                            <input id="btnEditFrom" onclick="return checkFrom();" type="submit"
                                   class="btn btn_save" name="btnFrom" value="保存">
                        </td>
                    </tr>
                    </tfoot>
                </table>
            </div>
        </form>
    </div>
</div>
<script src="/js_system/jQueryUI/jquery-ui.js"></script>
<script src="/js_system/jqueryui.js"></script>
</body>
</html>